<include file="Public/min-header" />
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
	<section class="content">
       <div class="row"> 
       		<div class="col-xs-12">
	       		<div class="box">
	             <div class="box-header">
	               	 <div class="row">
		  					<div class="col-md-10" style="width: 100%;">
		  						<form action="" method="get" class="navbar-form form-inline">
								
				  				
					  					<div class="form-group">
			                                    <div class="input-group">
			                                        <input type="text" name="name" value="{:I('name')}" placeholder="客户名或者店铺名" id="input-email" class="form-control">
													<!-- <input type="hidden" name="p" value="" id="input-email" class="form-control"> -->
			                                    </div>
			                             </div>
						  				<div class="form-group">
		                                    <div class="input-group">
		                                        <input type="text" name="biaoshi_xian" value="{:I('biaoshi_xian')}" placeholder="线路标识" id="input-mobile" class="form-control">
		                                    </div>
	                                	</div> 
					                    <div class="input-group">
					                      <input type="text" class="form-control pull-right" name="timegap" value="{$timegap}" id="start_time" style="width:250px;">
					                    </div>
										
										<input class="btn btn-primary margin" type="submit" value="确定" style="margin: -2px 35px;"> 
										
										<button type="button" style="margin-right:15%;" class="btn btn-default pull-right" id="daochu"><i class="fa fa-file-excel-o"></i>&nbsp;导出excel</button>
	                   		 	</form>
                   		 	</div>
		  			</div>
					<div class="row">
						<div class="col-sm-2 col-xs-6">
							成交额：<span style="color:red;">{$price_heji}</span>
						</div>
						<!--<div class="col-sm-2 col-xs-6">-->
						<!--	未发货：<span style="color:red;">{$notfahuo}</span>-->
						<!--</div>-->
						<!--<div class="col-sm-2 col-xs-6">-->
						<!--	已发货：<span style="color:red;">{$notfahuo2}</span>-->
						<!--</div>-->
						<!--	<div class="col-sm-2 col-xs-6">-->
						<!--	退款额：<span style="color:green;">{$tuikuans}</span>-->
						<!--</div>-->
						<!--	<div class="col-sm-2 col-xs-6">-->
						<!--	审核退款额：<span style="color:green;">{$tuikuans3}</span>-->
						<!--</div>-->
						<!--	<div class="col-sm-2 col-xs-6">-->
						<!--	未审核退款额：<span style="color:green;">{$tuikuans1}</span>-->
						<!--</div>-->
					</div>
	             </div><!-- /.box-header -->
				 
	             <div class="box-body">
	           	 <div class="row">
	            	<div class="col-sm-12">
		              <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
		                 <thead>
		                   <tr role="row">     
								<th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">商品名称</th>	
								<th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">线路标识</th>	
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">客户名</th>	
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">配送员</th>	
							   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">联系电话</th>
							   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">客户地址</th>	
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">购物单价</th>
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">购物数量</th>
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">订单总金额</th>
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">扣点收益</th>
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">退货金额</th>
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">订单状态</th>
			                   <th class="sorting" tabindex="0" aria-controls="example1" style="text-align: center;">订单号</th>
			                   <!--<th>操作</th>-->
		                   </tr>
		                 </thead>
						<tbody>
							<?php
								$p = I('p',1);
								$p = ($p-1)*20;
							 ?>
                         <foreach name="list" item="vo" key="k" >
                          <tr role="row" align="center">
		                     
							 <td>{$vo.goods_name}</td>
							 <td>{$vo.biaoshi_xian}</td>
		                     <td>{$vo.nickname}（{$vo.company}）</td>
							 <td>{$vo.drier}</td>		                    
							 <td>{$vo.mobile}</td>		                    
							 <td>{$vo.company_address}</td>
		                     <td style="color: red;">{$vo.price}</td>
		                     <td style="color: red;">{$vo.goods_num}</td>
		                     <td style="color: red;">{$vo.price_zong}</td>
		                     <td style="color: red;">{$vo.koudian}</td>
		                     <td style="color: red;">{$vo.tuihuo_price}</td>
		                     <td style="color: red;">{$vo.order_status}</td>
		                     <td style="color: red;">{$vo.order_sn}</td>
		                     <!--<td><a target="_blank" href="{:U('Order/index',array('order_sn'=>$vo[order_sn]))}" class="btn btn-info">查看</a></td>-->
		                   </tr>
		                  </foreach>
						  <tr>
							  <td colspan="7" style="text-align:right;font-size: 16px;">合计：</td>
							  <td colspan="1" style="font-size: 16px;color: red;">{$price_heji}</td>
							  <td colspan="3" style="font-size: 16px;color: red;">扣点总收益：{$koudian}</td>
						  </tr>
		                   </tbody>
		                 <tfoot>
		                 </tfoot>
		               </table>
	               </div>
	          </div>
              <div class="row">
              	    <div class="col-sm-6 text-left"></div>
                    <div class="col-sm-6 text-right">{$page}</div>		
              </div>
	          </div>
	        </div>
       	</div>
       </div>
   </section>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$('#start_time').daterangepicker({
		format:"YYYY-MM-DD HH:mm:ss",
		singleDatePicker: false,
		showDropdowns: true,
		minDate:'2021-01-01 00:00:00',
		maxDate:'2030-01-01 00:00:00',
		startDate:'{:date("Y-m-d")} 00:00:00',
        showWeekNumbers: true,
        timePicker: true,
        timePickerIncrement: 1,
        timePicker12Hour: false,
        ranges: {
           '今天': [moment(), moment()],
           '昨天': [moment().subtract('days', 1), moment().subtract('days', 1)],
           '最近7天': [moment().subtract('days', 6), moment()],
           '最近30天': [moment().subtract('days', 29), moment()],
           '上一个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
        },
        opens: 'right',
        buttonClasses: ['btn btn-default'],
        applyClass: 'btn-small btn-primary',
        cancelClass: 'btn-small',
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
 $("#daochu").click(function(){
    location.href='/index.php/Admin/Report/export_yanzhi?timegap={:I('timegap')}&name={:I('name')}&biaoshi_xian={:I('biaoshi_xian')}';
  });
});
</script>
</body>
</html>